<template>
  <!-- key = 000485be44cde5b3b9c2d55c4544ae9b -->
  <div id="map">
    <el-amap class="map-demo" vid="amapDemo" :zoom="10" :center="center">
      <el-amap-marker
        vid="component-marker"
        :position="center"
      ></el-amap-marker>
    </el-amap>
  </div>
</template>

<script>
export default {
  data() {
    return {
      currentPosition: [],
      center: [109.501845, 24.305464],
    };
  },
  computed: {},
  methods: {},
  created() {
    // console.log(this.$route.query);
    if (this.$route.query.latitude) {
      let { longitude, latitude } = this.$route.query;
      this.center = [longitude, latitude];
    }
  },
  mounted() {},
};
</script>
<style scoped>
#map {
  height: calc(100vh - 120px);
}
.map-demo {
  height: 800px;
}
</style>
